package job;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

public class RemoveFile {
    public static void main(String[] args) {
        try {
            // 获取ClassLoader
            ClassLoader classLoader = RenameFile.class.getClassLoader();

            // 读取resources下的文件
            InputStream inputStream = classLoader.getResourceAsStream("pairOfPages_1.txt");//双页处理_奇数

            if (inputStream == null) {
                throw new IllegalArgumentException("文件未找到!");
            } else {
                BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
                String line;
                while ((line = reader.readLine()) != null) {
                    System.out.println(line);

                }
                reader.close();
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

}
